﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web
{
    public partial class resource : System.Web.UI.Page
    {
        study.BLL.tb_file_class fcbll = new study.BLL.tb_file_class();
        study.BLL.tb_file fbll = new study.BLL.tb_file();
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["MENU_SELECTED"] = 2;
            if (!IsPostBack)
            {
                databind();
            }
        }

        protected void databind()
        {
            DataSet fcds = new DataSet();
            StringBuilder strWhere = new StringBuilder();
           
            fcds = fcbll.GetList("");
            this.ListView2.DataSource = fcds;
            this.ListView2.DataBind();
            Session["FCID"] =int.Parse( fcds.Tables[0].Rows[0]["ID"].ToString());
            ListView3.DataSource = fbll.GetList(10, "", "downtiem");
           ListView3.DataBind();
        
        }

        protected void ListView2_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (string.Equals(e.CommandName, "selected"))
            {
                LinkButton x = (LinkButton)e.CommandSource;
                Session["FCID"] =int.Parse( e.CommandArgument.ToString());    
              //  Response.AddHeader("Refresh", "0");
            }
        }

    }
}